public class Test2 {
    public static void main(String[] args) {
        Dog dog1 = new Dog("n",2);
        System.out.println("---------------------");
        Dog dog2 = new Dog("m",3);
    }
}
class Animal {
    public String name;
    public int age;

    static {
        System.out.println("父类静态代码块");
    }

    {
        System.out.println("父类普通代码块");
    }
    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("父类构造方法");
    }
}